****
****
****	Replication file for HLS analyses
****
****
****
****	Ojeda, Christopher, and Peter Hatemi
****
****	"Accounting for the Child in the Transmission of Party Identification"
****
****	American Sociological Review
****
****	December 2015
****
****	DOI: 10.1177/0003122415606101
****
****
****
****	TABLE OF CONTENTS:
****
****	+ Read-in Data
****
****	+ Note about estimation
****
****	+ Page 11 Note
****
****	+ Table 1
****
****	+ Table 2
****		- Full Sample
****			* Direct transmission
****			* Perception
****			* Identification
****		- Concordant Parents
****			* Direct transmission
****			* Perception
****			* Identification
****		- Discordant Parents
****			* Direct transmission
****			* Perception
****			* Identification
****
****	+ Table 3
****		- Mothers
****		- Fathers
****
****	+ Table 4
****		- Trait-to-trait
****		- Perceptual pathway
****
****	+ Page 16 Note
****		- Trait-to-trait
****		- Perceptual pathway
****
****	+ Table 6
****		- Mothers
****			* Trait-to-trait
****			* Perception
****			* Adoption
****		- Fathers
****			* Trait-to-trait
****			* Perception
****			* Adoption
****


****
**** READ-IN DATA
****

use "insert path and file name here.dta", clear



****
**** A NOTE ABOUT ESTIMATION
**** 

/*
Below are the most detailed models; they are used to determine our sample size for
all other models; run these first in order to generate y-hats that can then be used
to filter out observations with missingness (in order to maintain sample size across
models)
*/
svyset FAMID_ANZUS65K
svy: ologit pol_cs pol_ms pol_com sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs, or
predict y_hat_mom
svy: ologit pol_cs pol_fs pol_cof sex_child age_child ///
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs, or
predict y_hat_dad


****
**** PAGE 11 NOTE [Distribution of child-reported PID]
****

tab pol_cs if y_hat_mom != . & pol_cs != .



****
**** TABLE 1 ["Transmission Does Not Occur..."]
****

tab mom_table if y_hat_mom != .
tab dad_table if y_hat_dad != .



****
**** TABLE 2 ["Correlations Indicate an Important Role..."]
****

**
** FULL SAMPLE

* Direct transmission
cor pol_cs pol_ms if y_hat_mom != .
cor pol_cs pol_fs if y_hat_dad != . 

* Perception
cor pol_com pol_ms if y_hat_mom != . & pol_cs != .
cor pol_cof pol_fs if y_hat_dad != . & pol_cs != .

* Identification
cor pol_com pol_cs if y_hat_mom != .
cor pol_cof pol_cs if y_hat_dad != .


**
** CONCORDANT PARENTS

* Direct transmission
cor pol_cs pol_ms if y_hat_mom != . & parent_sim3 == 1
cor pol_cs pol_fs if y_hat_dad != . & parent_sim3 == 1

* Perception
cor pol_com pol_ms if y_hat_mom != . & parent_sim3 == 1 & pol_cs != .
cor pol_cof pol_fs if y_hat_dad != . & parent_sim3 == 1 & pol_cs != .

* Identification
cor pol_com pol_cs if y_hat_mom != . & parent_sim3 == 1
cor pol_cof pol_cs if y_hat_dad != . & parent_sim3 == 1


**
** DISCONCORDANT PARENTS

* Direct transmission
cor pol_cs pol_ms if y_hat_dis != . & parent_sim3 == 0
cor pol_cs pol_fs if y_hat_dis != . & parent_sim3 == 0

* Perception
cor pol_com pol_ms if y_hat_dis != . & parent_sim3 == 0 & pol_cs != .
cor pol_cof pol_fs if y_hat_dis != . & parent_sim3 == 0 & pol_cs != .

* Identification
cor pol_com pol_cs if y_hat_dis != . & parent_sim3 == 0
cor pol_cof pol_cs if y_hat_dis != . & parent_sim3 == 0



**** 
**** TABLE 3 ["Characteristics of the HLS..."]
****

*Mothers
sum sex_child age_child /// 
	educ_HS_cs educ_college_cs ///
	educ_HS_ms educ_college_ms ///
	minc_child att_cs if y_hat_mom != . & pol_cs != .

*Fathers
sum sex_child age_child /// 
	educ_HS_cs educ_college_cs ///
	educ_HS_fs educ_college_fs ///
	minc_child att_cs if y_hat_dad != . & pol_cs ! = .
	


****
**** TABLE 4 ["The Perceptual Pathway Model..."]
****

svyset FAMID_ANZUS65K

*Trait-to-trait
svy: ologit pol_cs pol_ms sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs if y_hat_mom != ., or
svy: ologit pol_cs pol_fs sex_child age_child ///
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs if y_hat_dad != ., or

*Perceptual pathway
svy: ologit pol_cs pol_ms pol_com sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs, or
prchange, rest(median)
svy: ologit pol_cs pol_fs pol_cof sex_child age_child ///
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs, or
prchange, rest(median)


****
**** PAGE 16 NOTE ABOUT AGE OF SAMPLE
****	
	
/*
"...we conduct additional analyses by restricting the sample
to adolescents and young adults (i.e., respondents age 16 to 24).
Results using this restricted saple are consistent (i.e. same
direction and significance) with results of the full sample..."
*/	

*Trait-to-trait
svy: ologit pol_cs pol_ms sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs if y_hat_mom != . & age_child <= 24, or
svy: ologit pol_cs pol_fs sex_child age_child ///
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs if y_hat_dad != . & age_child <= 24, or

*Perceptual pathway
svy: ologit pol_cs pol_ms pol_com sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs & age_child <= 24, or
prchange, rest(median)
svy: ologit pol_cs pol_fs pol_cof sex_child age_child ///
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs & age_child <= 24, or
prchange, rest(median)



****
**** TABLE 6 ["Social support increases the..."]
****

**
** MOTHERS

gen pol_ms_int = pol_ms*soc
gen pol_com_int = pol_com*soc

*Trait-to-trait
svy: ologit pol_cs pol_ms soc pol_ms_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs if y_hat_mom != ., or

*Perception
svy: ologit pol_com pol_ms soc pol_ms_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs if y_hat_mom != . & pol_cs != ., or

*Adoption
svy: ologit pol_cs pol_ms pol_com soc pol_com_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_ms educ_college_ms ///
			minc10 att_cs if y_hat_mom != ., or	

**
** FATHERS

gen pol_fs_int = pol_fs*soc
gen pol_cof_int = pol_cof*soc

*Trait-to-trait
svy: ologit pol_cs pol_fs soc pol_fs_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs if y_hat_dad != ., or

*Perception
svy: ologit pol_cof pol_fs soc pol_fs_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs if y_hat_dad != . & pol_cs != ., or

*Adoption
svy: ologit pol_cs pol_fs pol_cof soc pol_cof_int ///
			sex_child age_child /// 
			educ_HS_cs educ_college_cs ///
			educ_HS_fs educ_college_fs ///
			minc10 att_cs if y_hat_dad != ., or
